Skip to main content

Interpreter

Given a language, the Interpreter design pattern defines a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.

Usage     Usage     Low

UML class diagram

A visualization of the classes and objects participating in this pattern.

diagram

Sample code

This structural code demonstrates the Interpreter patterns, which using a defined grammar, provides the interpreter that processes parsed statements.


Output


See also